#ifndef ENGINE_VECTOR_2_H
#define ENGINE_VECTOR_2_H

namespace Shiny
{
	namespace Maths
	{
		struct Vector2
		{
			float x;
			float y;

			// Explicit constructor prevents automatic conversion from float to Vector2
			explicit Vector2(float _x = 0.0f, float _y = 0.0f) : x(_x), y(_y) {}
		};

		// VECTOR2 + VECTOR2
		inline Vector2 operator + (const Vector2& left, const Vector2& right)
		{
			return Vector2(left.x + right.x, left.y + right.y);
		}

		// SCALAR * VECTOR2
		inline Vector2 operator * (const float scalar, const Vector2& vector)
		{
			return Vector2(scalar * vector.x, scalar * vector.y);
		}

		// VECTOR2 * SCALAR
		inline Vector2 operator * (const Vector2& vector, const float scalar)
		{
			return Vector2(vector.x * scalar, vector.y * scalar);
		}
	}

}

#endif // ENGINE_VECTOR_2_H
